package cn.zmlio.mybatis;

import cn.zmlio.mybatis.dialect.MySQLDialect;
import cn.zmlio.mybatis.dialect.OracleDialect;

/**
 * @author zml
 */
public class DialectFactory {
    public static Dialect buildDialect(String dialectName) {
        dialectName = dialectName.toLowerCase();
        switch (dialectName) {
            case "mysql":
                return new MySQLDialect();
            case "oracle":
                return new OracleDialect();
            default:
                return null;
        }

    }
}
